function [ windowedImg, leftSystoleBound, rightSystoleBound ] = getBoundingBoxGUI( RGB2, RGB, xAxisBottom, inputAxes, instructionText )
%UNTITLED2 Summary of this function goes here
%   Detailed explanation goes here

%Display prompt and get user input bounding box on systole ejection period
axes(inputAxes);
imshow(RGB2)
set(instructionText, 'String', strcat('Please click and drag a rectangle to contain the systole', ...
    ' ejection period (outward flow curve). Make sure to overshoot the ejection period slighly on', ...
    'either side (you will be prompted to narrow this later.)'))
boundingBox = getrect();
windowedImg = RGB(xAxisBottom:length(RGB(:, 1)), boundingBox(1):boundingBox(1)+boundingBox(3));

%Output bounds for use n zero padding later
leftSystoleBound = boundingBox(1);
rightSystoleBound = boundingBox(1)+boundingBox(3);

end